package com.yc.demo;

import com.yc.demo.service.impl.HelloService;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Bean;


/**
 * <p>启动类</p>
 *
 * @author YuanChilde
 * @date 2019-05-07 13:12
 * @version 1.0
 * Modification History:
 * Date    Author      Version     Description
 * -----------------------------------------------------------------
 * 2019-05-07 13:12    YuanChilde     1.0        新增
 */
public class StartupHelloApplication {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(StartupHelloApplication.class);
        ctx.start();
        ctx.close();
    }

    @Bean(initMethod = "init",destroyMethod = "destory")
    public HelloService createHelloService(){
        return new HelloService();
    }
}
